package com.ye.spring.controller;

import com.ye.spring.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;

@Controller("controller") //指定bean对象的id
public class UserController {

    @Autowired
    @Qualifier("userServiceImpl") //指定使用哪个id来注入属性
    private UserService userService;

    public void saveUser() {
        userService.saveUser();
    }
}
